package com.huilian.iotbox.admin.wap.service;


import com.github.pagehelper.PageInfo;
import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.dto.DeviceDto;
import com.huilian.iotbox.data.po.Device;
import com.huilian.iotbox.data.vo.DeviceVo;
import com.huilian.iotbox.data.vo.MerchantStoreVo;
import com.huilian.iotbox.data.vo.UserInfo;

import java.util.List;


public interface DeviceService {


    List<Device> findAllDeviceByCondition(DeviceDto deviceDto);

    Device findOneDeviceByCondition(DeviceDto deviceDto);

    DeviceVo findStatisticsDevice(DeviceDto deviceDto);

    DeviceVo findVendingMachineDevice(DeviceDto deviceDto);

    ServerResponse updateDeviceParamsById(DeviceDto deviceDto);

    ServerResponse findDevice(DeviceDto deviceDto);

    ServerResponse findDevice_v2(DeviceDto deviceDto);

    ServerResponse findDevice_v3(DeviceDto deviceDto);

    Integer findCountDeviceByMerchantStoreId(DeviceDto deviceDto);

    ServerResponse statisticsOnlineDevice(UserInfo userInfo);


    ServerResponse findAllDeviceByConditionAndPage(DeviceDto deviceDto);

    PageInfo<DeviceVo> findVendingMachineByConditionAndPage(DeviceDto deviceDto);




    /**
     * 查询设备是否已经绑定
     *
     * @param deviceDto
     * @return
     */

    ServerResponse findIsBinding(DeviceDto deviceDto);

    /**
     * 查询已绑定有效期的设备
     *
     * @param deviceDto
     * @return
     */
    List<DeviceVo> findBindingDevice(DeviceDto deviceDto);


    PageInfo<DeviceVo> deviceList(DeviceDto deviceDto);


    DeviceVo findOneDeviceByDeviceNo(String deviceNo);
    DeviceVo findOneDeviceByDeviceNoJoinProduct(String deviceNo);



    ServerResponse updateDeviceRemarkNameById(DeviceDto deviceDto);



    List<DeviceVo> findAllDeviceByMerchantStoreIdArray(DeviceDto deviceDto);


    ServerResponse findAllDeviceByMerchantStoreId(DeviceDto deviceDto);

    void updateDeviceAutomaticCoin(Integer id, boolean automaticCoin);

    ServerResponse shiftDevice(DeviceDto deviceDto);

    DeviceVo getDeviceById(Integer deviceId);

    List<DeviceVo> findAllDeviceByIdAndPermission(DeviceDto deviceDto);


    Integer findDeviceCountByMerchantStoreId(DeviceDto deviceDto);

    /**
     * 禁用/解除禁用 单个设备
     * */
    ServerResponse upDisableDevice(DeviceDto deviceDto);

    /**
     * 设备转场
     * */
    ServerResponse deviceTransition(DeviceDto deviceDto);


    /**
     * 商品分类开关
     */
    Integer updateCommodityGroupSwitch(DeviceDto deviceDto);

    DeviceVo findDeviceVoById(DeviceDto deviceDto);

    /**
     * 修改顾客购买设置
     */
    Integer updateCustomerBuySet(DeviceDto deviceDto);

    /**
     * 售货设备
     * */
    ServerResponse findSalesDevice(DeviceDto deviceDto);

    List<DeviceVo> findGateGateDevice(MerchantStoreVo merchantStoreVo);

    ServerResponse findClientUrl(DeviceDto deviceDto);


    ServerResponse getDeviceByManufacturers(UserInfo userInfo);

    Integer groupAgencyIdReturnOfficialAccount(UserInfo userInfo);

    void bluetoothTestResults(String protocol);

    ServerResponse bluetoothOneClickReplenishment(DeviceDto deviceDto);

    ServerResponse findOutOfStockItems(DeviceDto deviceDto);

    Integer findDeviceCountByUserId(DeviceDto deviceDto);

    DeviceVo findOneDeviceByIdAndPermission(DeviceDto deviceDto);

    ServerResponse updateUnbindDevice(DeviceDto deviceDto);

    ServerResponse updateBindDeviceByMerchantStoreId(DeviceDto deviceDto, UserInfo userInfo);
}
